package cn.com.infohold.smartcity.activity;

import android.content.Intent;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;

import cn.com.infohold.smartcity.R;
import cn.com.infohold.smartcity.activity.Approve.Approve_Activity;
import cn.com.infohold.smartcity.activity.Chengbaofang.ChengBaoFang_Activity;
import cn.com.infohold.smartcity.activity.Dispute.Dispute_Activity;
import cn.com.infohold.smartcity.activity.Fabaofang.FaBaoFang_Activity;
import cn.com.infohold.smartcity.activity.Landinfo.LandInfo_Activity;
import cn.com.infohold.smartcity.activity.Publishinfo.PublishInfo_Activity;
import cn.com.infohold.smartcity.activity.Warrant.Warrant_Activity;
import cn.com.infohold.smartcity.parent.ParentActivity;
import common.annotation.ViewInject;
import library.utils.Utils;

/**
 * Created by Monsoon on 2017/11/3.
 */
public class HomePageActivity extends ParentActivity implements View.OnClickListener{

    @ViewInject(R.id.iv_avatar)
    ImageView iv_avatar;
    @ViewInject(R.id.ib_msg)
    ImageButton ib_msg;
    @ViewInject(R.id.ib_setting)
    ImageButton ib_setting;

    @ViewInject(R.id.ll_landinfo)
    LinearLayout ll_landinfo;
    @ViewInject(R.id.ll_fabaofang)
    LinearLayout ll_fabaofang;
    @ViewInject(R.id.ll_chengbaofang)
    LinearLayout ll_chengbaofang;
    @ViewInject(R.id.ll_warrant)
    LinearLayout ll_warrant;
    @ViewInject(R.id.ll_approve)
    LinearLayout ll_approve;
    @ViewInject(R.id.ll_publishinfo)
    LinearLayout ll_publishinfo;
    @ViewInject(R.id.ll_dispute)
    LinearLayout ll_dispute;
    @ViewInject(R.id.ll_document)
    LinearLayout ll_document;


    @Override
    protected Object inflateView() {
        return R.layout.activity_homepage;
    }

    @Override
    protected void initView(View anchor) {

        iv_avatar.setOnClickListener(this);
        ib_msg.setOnClickListener(this);
        ib_setting.setOnClickListener(this);
        ll_landinfo.setOnClickListener(this);
        ll_approve.setOnClickListener(this);
        ll_dispute.setOnClickListener(this);
        ll_fabaofang.setOnClickListener(this);
        ll_chengbaofang.setOnClickListener(this);
        ll_publishinfo.setOnClickListener(this);
        ll_warrant.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.iv_avatar://头像
                startActivity(new Intent(HomePageActivity.this,UserProfileActivity.class));
                overridePendingTransitionFade();
                break;
            case R.id.ib_msg://消息
                break;
            case R.id.ib_setting://设置
                break;

            case R.id.ll_landinfo://土地信息管理
                Utils.startActivity(this,LandInfo_Activity.class);
                overridePendingTransitionFade();
                break;
            case R.id.ll_approve://审批管理
                Utils.startActivity(this,Approve_Activity.class);
                overridePendingTransitionFade();
                break;
            case R.id.ll_dispute://土地纠纷管理
                Utils.startActivity(this,Dispute_Activity.class);
                overridePendingTransitionFade();
                break;
            case R.id.ll_fabaofang://发包方管理
                Utils.startActivity(this,FaBaoFang_Activity.class);
                overridePendingTransitionFade();
                break;
            case R.id.ll_chengbaofang://承包方管理
                Utils.startActivity(this,ChengBaoFang_Activity.class);
                overridePendingTransitionFade();
                break;
            case R.id.ll_publishinfo://发布信息管理
                Utils.startActivity(this,PublishInfo_Activity.class);
                overridePendingTransitionFade();
                break;
            case R.id.ll_warrant://权证管理
                Utils.startActivity(this,Warrant_Activity.class);
                overridePendingTransitionFade();
                break;
            default:
                break;
        }
    }
}
